<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Minikombajn Pomiarowy: Dokumentacja pliku /home/arek/Dokumenty/AVRprograms/MKP_3_7/Wobuloskop.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Wygenerowano przez Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Szukaj');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Minikombajn Pomiarowy&#160;<span id="projectnumber">1.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Strona&#160;główna</span></a></li>
      <li class="current"><a href="files.html"><span>Pliki</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Szukaj" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Lista&#160;plików</span></a></li>
      <li><a href="globals.html"><span>Globalne</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#define-members">Definicje</a> &#124;
<a href="#func-members">Funkcje</a> &#124;
<a href="#var-members">Zmienne</a>  </div>
  <div class="headertitle">
<h1>Dokumentacja pliku /home/arek/Dokumenty/AVRprograms/MKP_3_7/Wobuloskop.c</h1>  </div>
</div>
<div class="contents">

<p>Plik podprogramu wobuloskopu.  
<a href="#_details">Więcej...</a></p>
<div class="textblock"><code>#include &lt;avr/io.h&gt;</code><br/>
<code>#include &lt;util/delay.h&gt;</code><br/>
<code>#include &lt;math.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_a_d_c_8h_source.html">ADC.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_keyboard_8h_source.html">Keyboard.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="lcd132x64_8h_source.html">lcd132x64.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_grafika_8h_source.html">Grafika.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_generator_8h_source.html">Generator.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_analizator_8h_source.html">Analizator.h</a>&quot;</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Definicje</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2ea8acdc0c0efeb4898ee8970eebc7d7"></a><!-- doxytag: member="Wobuloskop.c::F_clk" ref="a2ea8acdc0c0efeb4898ee8970eebc7d7" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>F_clk</b>&#160;&#160;&#160;2048000000</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9629196f0145203d9f7641f8e42c75b2"></a><!-- doxytag: member="Wobuloskop.c::F_max" ref="a9629196f0145203d9f7641f8e42c75b2" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>F_max</b>&#160;&#160;&#160;32000000</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Funkcje</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_wobuloskop_8c.html#ae499dbc004ef8c4a87fb156d19b76b71">Dirac</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funkcja obliczajaca charakterystyke badanego ukladu pobudzonego impulsem Diraca.  <a href="#ae499dbc004ef8c4a87fb156d19b76b71"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_wobuloskop_8c.html#a9c7fd5710fd0d05eb3751abae8160352">Noise</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funkcja obliczajaca charakterystyke badanego ukladu pobudzanego szumem bialym.  <a href="#a9c7fd5710fd0d05eb3751abae8160352"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_wobuloskop_8c.html#a5dde3ef5f2f1f248d37d6127b136dec2">Sweep</a> (float freqf, float step_freqf)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funkcja obliczajaca charakterystyke badanego ukladu przemiataniem czestotliwosci.  <a href="#a5dde3ef5f2f1f248d37d6127b136dec2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_wobuloskop_8c.html#a12a19bd43ac09ca4b56b2fa137201d02">sqr2</a> (float a)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funkcja obliczajaca pierwiastek kwadratowy liczby zmiennoprzecinkowej.  <a href="#a12a19bd43ac09ca4b56b2fa137201d02"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_wobuloskop_8c.html#a47a7234d1431927f5ca6fcab4ea0175b">Wobuloskop</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Funkcja glowna wobuloskopu.  <a href="#a47a7234d1431927f5ca6fcab4ea0175b"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Zmienne</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1156c1c2861a3a001c9c669890a650f2"></a><!-- doxytag: member="Wobuloskop.c::kan1_in" ref="a1156c1c2861a3a001c9c669890a650f2" args="[512]" -->
int16_t&#160;</td><td class="memItemRight" valign="bottom"><b>kan1_in</b> [512]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a72b278c98e4f0f2326725a7bf09fb2e3"></a><!-- doxytag: member="Wobuloskop.c::kan2_in" ref="a72b278c98e4f0f2326725a7bf09fb2e3" args="[512]" -->
int16_t&#160;</td><td class="memItemRight" valign="bottom"><b>kan2_in</b> [512]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af423a976158fe538fe98fca1e1172951"></a><!-- doxytag: member="Wobuloskop.c::kan_out" ref="af423a976158fe538fe98fca1e1172951" args="[512]" -->
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><b>kan_out</b> [512]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a72446b5d039156d1ee57fad11f897788"></a><!-- doxytag: member="Wobuloskop.c::kan1_lcd" ref="a72446b5d039156d1ee57fad11f897788" args="[128]" -->
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>kan1_lcd</b> [128]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7ca521de688343c2bc36b0ea84252668"></a><!-- doxytag: member="Wobuloskop.c::kan2_lcd" ref="a7ca521de688343c2bc36b0ea84252668" args="[128]" -->
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>kan2_lcd</b> [128]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a43f307fc745d464cb73dcbdd4870f067"></a><!-- doxytag: member="Wobuloskop.c::sin_tab" ref="a43f307fc745d464cb73dcbdd4870f067" args="[640]" -->
prog_int16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_wobuloskop_8c.html#a43f307fc745d464cb73dcbdd4870f067">sin_tab</a> [640]</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Tablica funkcji sin [0, 2.5PI]. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a951974e89d755b7c65e3a2d7b6f49096"></a><!-- doxytag: member="Wobuloskop.c::war" ref="a951974e89d755b7c65e3a2d7b6f49096" args="" -->
uint32_t&#160;</td><td class="memItemRight" valign="bottom"><b>war</b> = 0x1</td></tr>
</table>
<hr/><a name="_details"></a><h2>Opis szczegółowy</h2>
<div class="textblock"><p>Plik podprogramu wobuloskopu. </p>
<dl class="author"><dt><b>Autor:</b></dt><dd>Arkadiusz Hudzikowski </dd></dl>
<dl class="version"><dt><b>Wersja:</b></dt><dd>1.0 </dd></dl>
<dl class="date"><dt><b>Data:</b></dt><dd>22.11.2011 </dd></dl>
</div><hr/><h2>Dokumentacja funkcji</h2>
<a class="anchor" id="ae499dbc004ef8c4a87fb156d19b76b71"></a><!-- doxytag: member="Wobuloskop.c::Dirac" ref="ae499dbc004ef8c4a87fb156d19b76b71" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Dirac </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funkcja obliczajaca charakterystyke badanego ukladu pobudzonego impulsem Diraca. </p>
<p>Wygenerowany zostaje bardzo krotki impuls, nastepnie zostaje zapisana reakcja badanego ukladu na to pobudzenie (odpowiedz impulsowa) i na tej podstawie obliczona FFT. </p>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a9c7fd5710fd0d05eb3751abae8160352"></a><!-- doxytag: member="Wobuloskop.c::Noise" ref="a9c7fd5710fd0d05eb3751abae8160352" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Noise </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funkcja obliczajaca charakterystyke badanego ukladu pobudzanego szumem bialym. </p>
<p>Zostaje wygenerowany szym bialy, a nastepnie zapisywana jest reakcja badanego ukladu na ten szum i na tej podstawie liczona jest FFT. Na koniec wyniki FFT zostaja usredniowe. </p>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a12a19bd43ac09ca4b56b2fa137201d02"></a><!-- doxytag: member="Wobuloskop.c::sqr2" ref="a12a19bd43ac09ca4b56b2fa137201d02" args="(float a)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sqr2 </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funkcja obliczajaca pierwiastek kwadratowy liczby zmiennoprzecinkowej. </p>
<dl><dt><b>Parametry:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>: zmienna, ktorej pierwiastek jest liczony </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>float : pierwiastek zmiennej a </dd></dl>

</div>
</div>
<a class="anchor" id="a5dde3ef5f2f1f248d37d6127b136dec2"></a><!-- doxytag: member="Wobuloskop.c::Sweep" ref="a5dde3ef5f2f1f248d37d6127b136dec2" args="(float freqf, float step_freqf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Sweep </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>freqf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>step_freqf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funkcja obliczajaca charakterystyke badanego ukladu przemiataniem czestotliwosci. </p>
<p>Zostaje wygenerowany sygnal sinusoidalny o zmiennej czestotliwosci i stalej amplitudzie. Dla kolejnych czestotliwosci mierzona jest amplituda sygnalu na wysciu badanego ukladu. </p>
<dl><dt><b>Parametry:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">freqf</td><td>: czestotliwosc poczatkowa </td></tr>
    <tr><td class="paramname">step_freqf</td><td>: krok zmiany czestotliwosci </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>none </dd></dl>

</div>
</div>
<a class="anchor" id="a47a7234d1431927f5ca6fcab4ea0175b"></a><!-- doxytag: member="Wobuloskop.c::Wobuloskop" ref="a47a7234d1431927f5ca6fcab4ea0175b" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wobuloskop </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Funkcja glowna wobuloskopu. </p>
<dl class="return"><dt><b>Zwraca:</b></dt><dd>none </dd></dl>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Pliki</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Funkcje</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Zmienne</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Definicje</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Wygenerowano Fri Dec 30 2011 17:28:02 dla Minikombajn Pomiarowy programem&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
